#ifndef SIGNALGEN_H
#define SIGNALGEN_H

#include "GenericTypeDefs.h"

void InitFpga(void);

void FpgaReset(void);
//void ManualClk(void);
#define ManualClk()     fpga_manclk = 0; fpga_manclk = 1;
#define WriteClk()      fpga_writeclk = 1; fpga_writeclk = 0;
//void WriteClk(void);

void FpgaResetStop(void);
void FpgaInitWrite(void);
void FpgaWrite(BYTE* data, SHORT size);
void FpgaInitGenerate(DWORD freq, SHORT phase, BYTE manual);

void FpgaSetFreq(DWORD freq);
void FpgaSetPhase(SHORT phase);
void FpgaSetClockSource(BYTE manual);

#define FPGA_SAMPLE_NUM  2048
#define FPGA_FREQ  100000
#define FPGA_SAMPLE_RESOLUTION  8
#define FPGA_PHASE_RESOLUTION  10
#define FPGA_ACC_RESOLUTION  32
#define FPGA_FREQ_RESOLUTION  30

#endif